package com.chinasoft.book.app;

import com.chinasoft.book.mapper.BookMapper;
import com.chinasoft.book.pojo.CollObject;
import com.chinasoft.book.service.BookService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class BeanCollectionDIMain {

    public static void main(String[] args) {
        ApplicationContext ioc = new ClassPathXmlApplicationContext("bean_collection_di.xml");

        CollObject co = ioc.getBean("collObject", CollObject.class);
        System.out.println(co);

        BookMapper bookMapper = co.getMapperList().get(0);
        bookMapper.selectById(1000);

    }
}
